package com.hzvtc.myproject.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class Leave {
    private Long id; // 请假ID

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time; // 请假时间

    @NotBlank
    private String reason; // 请假原因

    private Boolean isBack; // 是否已返校

    @NotNull
    private Long studentId; // 学生ID

    private Student student; // 学生对象

    @NotBlank
    private String target; // 请假去向

    private LocalDate backDate; // 返校日期
}
